package com.hist.demo1;

/**
 * @auther Ren Gaoshuai
 * @date 2021-04-06 16:40
 **/
public class ServiceUserProxy implements ServiceUser{
    private ServiceUserImpl serviceUser;

    public void setServiceUser(ServiceUserImpl serviceUser) {
        this.serviceUser = serviceUser;
    }


    public void add() {
        showLogger("add");
        serviceUser.add();
    }

    public void delete() {
        showLogger("delete");
        serviceUser.delete();
    }

    public void update() {
        showLogger("update");
        serviceUser.update();
    }

    public void query() {
        showLogger("query");
        serviceUser.query();
    }

    public void showLogger(String str){
        System.out.println("[Debug]"+str+"方法正在执行！");
    }
}
